runOrFail

inline fun <R> runOrFail(finally: () -> Unit = {}, flush: Boolean = true, block: () -> R): R

Runs block, fail-ing if an exception is thrown and not caught within block.

Runs finally in the try-catch's finally block. If flush is true, prints a newline in the finally block.

Sources

js source
Link copied to clipboard